// 搜索条件·改
import dayjs from 'dayjs'
import PropTypes from 'prop-types'
import { Select, DatePicker, TreeSelect } from 'antd'

const DateList = {
    year: 'YYYY',
    month: 'YYYY-MM',
    date: 'YYYY-MM-DD',
    time: 'HH:mm:ss',
    showTime: 'YYYY-MM-DD HH:mm:ss'
}

export const SearchSort = ({ value, onChange, options }) => {
    SearchSort.propTypes = {
        value: PropTypes.array,
        onChange: PropTypes.func,
        options: PropTypes.string
    }
    const SearchList = {
        Api: [
            { label: '组织机构-正序', value: 'OOrganizationName-asc' },
            { label: '组织机构-倒序', value: 'OOrganizationName-desc' },
            { label: '人员类型-正序', value: 'OPersonTypeName-asc' },
            { label: '人员类型-倒序', value: 'OPersonTypeName-desc' },
            { label: '材料类型-正序', value: 'OPersonName-asc' },
            { label: '材料类型-倒序', value: 'OPersonName-desc' },
        ],
        EngineeringListOrganization: [
            { label: '组织机构-正序', value: 'OOrganizationName-asc' },
            { label: '组织机构-倒序', value: 'OOrganizationName-desc' },
            { label: '清单序号-正序', value: 'OSortId-asc' },
            { label: '清单序号-倒序', value: 'OSortId-desc' },
            { label: '清单名称-正序', value: 'OEngineeringListName-asc' },
            { label: '清单名称-倒序', value: 'OEngineeringListName-desc' },
        ],
        EngineeringListYearPlan: [
            { label: '组织机构-正序', value: 'OOrganizationName-asc' },
            { label: '组织机构-倒序', value: 'OOrganizationName-desc' },
            { label: '清单序号-正序', value: 'OSortId-asc' },
            { label: '清单序号-倒序', value: 'OSortId-desc' },
            { label: '清单名称-正序', value: 'OEngineeringListName-asc' },
            { label: '清单名称-倒序', value: 'OEngineeringListName-desc' },
            { label: '年份-正序', value: 'OYear-asc' },
            { label: '年份-倒序', value: 'OYear-desc' },
        ],
        EngineeringListMonthPlan: [
            { label: '组织机构-正序', value: 'OOrganizationName-asc' },
            { label: '组织机构-倒序', value: 'OOrganizationName-desc' },
            { label: '清单序号-正序', value: 'OSortId-asc' },
            { label: '清单序号-倒序', value: 'OSortId-desc' },
            { label: '清单名称-正序', value: 'OEngineeringListName-asc' },
            { label: '清单名称-倒序', value: 'OEngineeringListName-desc' },
            { label: '年份-正序', value: 'OYear-asc' },
            { label: '年份-倒序', value: 'OYear-desc' },
        ],
        EngineeringListDateStat: [
            { label: '组织机构-正序', value: 'OOrganizationName-asc' },
            { label: '组织机构-倒序', value: 'OOrganizationName-desc' },
            { label: '清单序号-正序', value: 'OSortId-asc' },
            { label: '清单序号-倒序', value: 'OSortId-desc' },
            { label: '清单名称-正序', value: 'OEngineeringListName-asc' },
            { label: '清单名称-倒序', value: 'OEngineeringListName-desc' },
            { label: '统计日期-正序', value: 'OStatDate-asc' },
            { label: '统计日期-倒序', value: 'OStatDate-desc' },
        ],
        Security: [
            { label: '组织机构-正序', value: 'OOrganizationName-asc' },
            { label: '组织机构-倒序', value: 'OOrganizationName-desc' },
            { label: '巡检名称-正序', value: 'OTableName-asc' },
            { label: '巡检名称-倒序', value: 'OTableName-desc' },
            { label: '巡检类型-正序', value: 'OSecurityProblemTypeName-asc' },
            { label: '巡检类型-倒序', value: 'OSecurityProblemTypeName-desc' },
            { label: '巡检状态-正序', value: 'OAuditStatus-asc' },
            { label: '巡检状态-倒序', value: 'OAuditStatus-desc' },
            { label: '巡检日期-正序', value: 'OSecurityDate-asc' },
            { label: '巡检日期-倒序', value: 'OSecurityDate-desc' },
        ],
        Person: [
            { label: '组织机构-正序', value: 'OOrganizationName-asc' },
            { label: '组织机构-倒序', value: 'OOrganizationName-desc' },
            { label: '人员类型-正序', value: 'OPersonTypeName-asc' },
            { label: '人员类型-倒序', value: 'OPersonTypeName-desc' },
            { label: '人员姓名-正序', value: 'OPersonName-asc' },
            { label: '人员姓名-倒序', value: 'OPersonName-desc' },
            { label: '是否党员-正序', value: 'IsPartyMember-asc' },
            { label: '是否党员-倒序', value: 'IsPartyMember-desc' },
        ],
        MaterialBatch: [
            { label: '组织机构-正序', value: 'OOrganizationName-asc' },
            { label: '组织机构-倒序', value: 'OOrganizationName-desc' },
            { label: '供应商名称-正序', value: 'OMaterialFactoryName-asc' },
            { label: '供应商名称-倒序', value: 'OMaterialFactoryName-desc' },
            { label: '材料类型-正序', value: 'OMaterialTypeName-asc' },
            { label: '材料类型-倒序', value: 'OMaterialTypeName-desc' },
            { label: '材料名称-正序', value: 'OMaterialName-asc' },
            { label: '材料名称-倒序', value: 'OMaterialName-desc' },
            { label: '进场日期-正序', value: 'OEntryTime-asc' },
            { label: '进场日期-倒序', value: 'OEntryTime-desc' },
        ],
        MaterialTrace: [
            { label: '组织机构-正序', value: 'OOrganizationName-asc' },
            { label: '组织机构-倒序', value: 'OOrganizationName-desc' },
            { label: '供应商名称-正序', value: 'OMaterialFactoryName-asc' },
            { label: '供应商名称-倒序', value: 'OMaterialFactoryName-desc' },
            { label: '材料类型-正序', value: 'OMaterialTypeName-asc' },
            { label: '材料类型-倒序', value: 'OMaterialTypeName-desc' },
            { label: '材料名称-正序', value: 'OMaterialName-asc' },
            { label: '材料名称-倒序', value: 'OMaterialName-desc' },
            { label: '使用日期-正序', value: 'OTraceTime-asc' },
            { label: '使用日期-倒序', value: 'OTraceTime-desc' },
        ],
        Machine: [
            { label: '组织机构-正序', value: 'OOrganizationName-asc' },
            { label: '组织机构-倒序', value: 'OOrganizationName-desc' },
            { label: '材料类型-正序', value: 'OMachineTypeName-asc' },
            { label: '材料类型-倒序', value: 'OMachineTypeName-desc' },
            { label: '进场日期-正序', value: 'OEntryTime-asc' },
            { label: '进场日期-倒序', value: 'OEntryTime-desc' },
        ],
        Video: [
            { label: '组织机构-正序', value: 'OOrganizationName-asc' },
            { label: '组织机构-倒序', value: 'OOrganizationName-desc' },
            { label: '视频名称-正序', value: 'OTableName-asc' },
            { label: '视频名称-倒序', value: 'OTableName-desc' },
            { label: '拍摄日期-正序', value: 'OVideoDate-asc' },
            { label: '拍摄日期-倒序', value: 'OVideoDate-desc' },
        ],
        Camera: [
            { label: '组织机构-正序', value: 'OOrganizationName-asc' },
            { label: '组织机构-倒序', value: 'OOrganizationName-desc' },
            { label: '类型-正序', value: 'OCameraTypeName-asc' },
            { label: '类型-倒序', value: 'OCameraTypeName-desc' },
            { label: '位置-正序', value: 'OCameraPositionName-asc' },
            { label: '位置-倒序', value: 'OCameraPositionName-desc' },
            { label: '名称-正序', value: 'OTableName-asc' },
            { label: '名称-倒序', value: 'OTableName-desc' },
            { label: '序列号-正序', value: 'ODeviceSerial-asc' },
            { label: '序列号-倒序', value: 'ODeviceSerial-desc' },
            { label: '排序-正序', value: 'OSortId-asc' },
            { label: '排序-倒序', value: 'OSortId-desc' },
        ],
        GetAlarmLists: [
            { label: '组织机构-正序', value: 'OOrganizationName-asc' },
            { label: '组织机构-倒序', value: 'OOrganizationName-desc' },
            { label: '摄像头名称-正序', value: 'OTableName-asc' },
            { label: '摄像头名称-倒序', value: 'OTableName-desc' },
            { label: '告警时间-正序', value: 'OAlarmTime-asc' },
            { label: '告警时间-倒序', value: 'OAlarmTime-desc' },
            { label: '序列号-正序', value: 'ODeviceSerial-asc' },
            { label: '序列号-倒序', value: 'ODeviceSerial-desc' },
            { label: '通道号-正序', value: 'OChannelNo-asc' },
            { label: '通道号-倒序', value: 'OChannelNo-desc' },
            { label: '状态-正序', value: 'OStatus-asc' },
            { label: '状态-倒序', value: 'OStatus-desc' },
        ],
        Sample: [
            { label: '组织机构-正序', value: 'OOrganizationUuid-asc' },
            { label: '组织机构-倒序', value: 'OOrganizationName-desc' },
            { label: '样品名称-正序', value: 'OTableName-asc' },
            { label: '样品名称-倒序', value: 'OTableName-desc' },
            { label: '送检日期-正序', value: 'OSendTime-asc' },
            { label: '送检日期-倒序', value: 'OSendTime-desc' },
            { label: '检测状态-正序', value: 'OStatus-asc' },
            { label: '检测状态-倒序', value: 'OStatus-desc' },
            { label: '工程名称-正序', value: 'OEngineeringName-asc' },
            { label: '工程名称-倒序', value: 'OEngineeringName-desc' },
            { label: '委托单位-正序', value: 'OClientOrganization-asc' },
            { label: '委托单位-倒序', value: 'OClientOrganization-desc' },
            { label: '工程部位-正序', value: 'OEngineeringPurpose-asc' },
            { label: '工程部位-倒序', value: 'OEngineeringPurpose-desc' },
            { label: '试验检测室-正序', value: 'OTestRoom-asc' },
            { label: '试验检测室-倒序', value: 'OTestRoom-desc' },
        ],
        LabMarshallStability: [
            { label: '组织机构-正序', value: 'OOrganizationName-asc' },
            { label: '组织机构-倒序', value: 'OOrganizationName-desc' },
            { label: '试验日期-正序', value: 'OTestDate-asc' },
            { label: '试验日期-倒序', value: 'OTestDate-desc' },
            { label: '评定结果-正序', value: 'OResult-asc' },
            { label: '评定结果-倒序', value: 'OResult-desc' },
            { label: '设备编号-正序', value: 'OEquipmentNumber-asc' },
            { label: '设备编号-倒序', value: 'OEquipmentNumber-desc' },
        ],
        LabPenetration: [
            { label: '组织机构-正序', value: 'OOrganizationName-asc' },
            { label: '组织机构-倒序', value: 'OOrganizationName-desc' },
            { label: '试验日期-正序', value: 'OTestDate-asc' },
            { label: '试验日期-倒序', value: 'OTestDate-desc' },
            { label: '评定结果-正序', value: 'OResult-asc' },
            { label: '评定结果-倒序', value: 'OResult-desc' },
            { label: '设备编号-正序', value: 'OEquipmentNumber-asc' },
            { label: '设备编号-倒序', value: 'OEquipmentNumber-desc' },
        ],
        LabDuctility: [
            { label: '组织机构-正序', value: 'OOrganizationName-asc' },
            { label: '组织机构-倒序', value: 'OOrganizationName-desc' },
            { label: '试验日期-正序', value: 'OTestDate-asc' },
            { label: '试验日期-倒序', value: 'OTestDate-desc' },
            { label: '评定结果-正序', value: 'OResult-asc' },
            { label: '评定结果-倒序', value: 'OResult-desc' },
            { label: '设备编号-正序', value: 'OEquipmentNumber-asc' },
            { label: '设备编号-倒序', value: 'OEquipmentNumber-desc' },
        ],
        LabSofteningPoint: [
            { label: '组织机构-正序', value: 'OOrganizationName-asc' },
            { label: '组织机构-倒序', value: 'OOrganizationName-desc' },
            { label: '试验日期-正序', value: 'OTestDate-asc' },
            { label: '试验日期-倒序', value: 'OTestDate-desc' },
            { label: '评定结果-正序', value: 'OResult-asc' },
            { label: '评定结果-倒序', value: 'OResult-desc' },
            { label: '设备编号-正序', value: 'OEquipmentNumber-asc' },
            { label: '设备编号-倒序', value: 'OEquipmentNumber-desc' },
        ],
        LabStressMachine: [
            { label: '组织机构-正序', value: 'OOrganizationName-asc' },
            { label: '组织机构-倒序', value: 'OOrganizationName-desc' },
            { label: '工程名称-正序', value: 'OProjectName-asc' },
            { label: '工程名称-倒序', value: 'OProjectName-desc' },
            { label: '施工部位-正序', value: 'OConstructionSpot-asc' },
            { label: '施工部位-倒序', value: 'OConstructionSpot-desc' },
            { label: '试验类型-正序', value: 'OTestType-asc' },
            { label: '试验类型-倒序', value: 'OTestType-desc' },
            { label: '试验日期-正序', value: 'OTestDate-asc' },
            { label: '试验日期-倒序', value: 'OTestDate-desc' },
            { label: '设计强度-正序', value: 'ODesignStrength-asc' },
            { label: '设计强度-倒序', value: 'ODesignStrength-desc' },
            { label: '评定结果-正序', value: 'OTestEvaluation-asc' },
            { label: '评定结果-倒序', value: 'OTestEvaluation-desc' },
            { label: '设备编号-正序', value: 'OEquipmentNumber-asc' },
            { label: '设备编号-倒序', value: 'OEquipmentNumber-desc' },
        ],
        LabUniversalRebar: [
            { label: '组织机构-正序', value: 'OOrganizationName-asc' },
            { label: '组织机构-倒序', value: 'OOrganizationName-desc' },
            { label: '试验日期-正序', value: 'OTestDate-asc' },
            { label: '试验日期-倒序', value: 'OTestDate-desc' },
            { label: '评定结果-正序', value: 'OResult-asc' },
            { label: '评定结果-倒序', value: 'OResult-desc' },
            { label: '设备编号-正序', value: 'OEquipmentNumber-asc' },
            { label: '设备编号-倒序', value: 'OEquipmentNumber-desc' },
        ],
        LabHumiture: [
            { label: '组织机构-正序', value: 'OOrganizationName-asc' },
            { label: '组织机构-倒序', value: 'OOrganizationName-desc' },
            { label: '试验日期-正序', value: 'ODataCreationTime-asc' },
            { label: '试验日期-倒序', value: 'ODataCreationTime-desc' },
            { label: '设备编号-正序', value: 'OEquipmentNumber-asc' },
            { label: '设备编号-倒序', value: 'OEquipmentNumber-desc' },
        ],
        LabCoverProtector: [
            { label: '组织机构-正序', value: 'OOrganizationName-asc' },
            { label: '组织机构-倒序', value: 'OOrganizationName-desc' },
            { label: '试验日期-正序', value: 'ODetectionTime-asc' },
            { label: '试验日期-倒序', value: 'ODetectionTime-desc' },
            { label: '设备编号-正序', value: 'OEquipmentNumber-asc' },
            { label: '设备编号-倒序', value: 'OEquipmentNumber-desc' },
            { label: '构件名称-正序', value: 'OComponentName-asc' },
            { label: '构件名称-倒序', value: 'OComponentName-desc' },
            { label: '结构物名称-正序', value: 'OStructureName-asc' },
            { label: '结构物名称-倒序', value: 'OStructureName-desc' },
            { label: '结构位置-正序', value: 'OStructuralPosition-asc' },
            { label: '结构位置-倒序', value: 'OStructuralPosition-desc' },
            { label: '设计厚度-正序', value: 'ODesignThickness-asc' },
            { label: '设计厚度-倒序', value: 'ODesignThickness-desc' },
            { label: '评定结果-正序', value: 'OGradingresults-asc' },
            { label: '评定结果-倒序', value: 'OGradingresults-desc' },
        ],
        LabReboundHammer: [
            { label: '组织机构-正序', value: 'OOrganizationName-asc' },
            { label: '组织机构-倒序', value: 'OOrganizationName-desc' },
            { label: '构件名称-正序', value: 'OComponentName-asc' },
            { label: '构件名称-倒序', value: 'OComponentName-desc' },
            { label: '构件编号-正序', value: 'OComponentNumber-asc' },
            { label: '构件编号-倒序', value: 'OComponentNumber-desc' },
            { label: '检测时间-正序', value: 'ODetectionTime-asc' },
            { label: '检测时间-倒序', value: 'ODetectionTime-desc' },
            { label: '砼设计等级-正序', value: 'ODesignGrade-asc' },
            { label: '砼设计等级-倒序', value: 'ODesignGrade-desc' },
            { label: '设备编号-正序', value: 'OEquipmentNumber-asc' },
            { label: '设备编号-倒序', value: 'OEquipmentNumber-desc' },
        ],
        LabPmsTesterCbr: [
            { label: '组织机构-正序', value: 'OOrganizationName-asc' },
            { label: '组织机构-倒序', value: 'OOrganizationName-desc' },
            { label: '试验组号-正序', value: 'OTestNo-asc' },
            { label: '试验组号-倒序', value: 'OTestNo-desc' },
            { label: '试验日期-正序', value: 'OTestDate-asc' },
            { label: '试验日期-倒序', value: 'OTestDate-desc' },
            { label: '设备编号-正序', value: 'OEquipmentNumber-asc' },
            { label: '设备编号-倒序', value: 'OEquipmentNumber-desc' },
            { label: '样品名称-正序', value: 'OSampleName-asc' },
            { label: '样品名称-倒序', value: 'OSampleName-desc' },
            { label: '评定结果-正序', value: 'OResult-asc' },
            { label: '评定结果-倒序', value: 'OResult-desc' },
        ],
        CementMixingStations: [
            { label: '组织机构-正序', value: 'OOrganizationName-asc' },
            { label: '组织机构-倒序', value: 'OOrganizationName-desc' },
            { label: '工程名称-正序', value: 'OProjectName-asc' },
            { label: '工程名称-倒序', value: 'OProjectName-desc' },
            { label: '试验类型-正序', value: 'OPouringPosition-asc' },
            { label: '试验类型-倒序', value: 'OPouringPosition-desc' },
            { label: '出料时间-正序', value: 'ODischargingTime-asc' },
            { label: '出料时间-倒序', value: 'ODischargingTime-desc' },
            { label: '强度等级-正序', value: 'OStrengthGrade-asc' },
            { label: '强度等级-倒序', value: 'OStrengthGrade-desc' },
            { label: '本盘是否超标-正序', value: 'OExcessState-asc' },
            { label: '本盘是否超标-倒序', value: 'OExcessState-desc' },
        ],
        LabAsphalt: [
            { label: '组织机构-正序', value: 'OOrganizationName-asc' },
            { label: '组织机构-倒序', value: 'OOrganizationName-desc' },
            { label: '工程名称-正序', value: 'OEngineeringName-asc' },
            { label: '工程名称-倒序', value: 'OEngineeringName-desc' },
            { label: '施工地点-正序', value: 'OConstructionSite-asc' },
            { label: '施工地点-倒序', value: 'OConstructionSite-desc' },
            { label: '使用层位-正序', value: 'OLayerPosition-asc' },
            { label: '使用层位-倒序', value: 'OLayerPosition-desc' },
            { label: '出料时间-正序', value: 'ODischargingTime-asc' },
            { label: '出料时间-倒序', value: 'ODischargingTime-desc' },
            { label: '配合比编号-正序', value: 'OProportionIdGet-asc' },
            { label: '配合比编号-倒序', value: 'OProportionIdGet-desc' },
            { label: '超标等级-正序', value: 'OExcessState-asc' },
            { label: '超标等级-倒序', value: 'OExcessState-desc' },
        ],
        CementMixingStationsExceeded: [
            { label: '组织机构-正序', value: 'OOrganizationName-asc' },
            { label: '组织机构-倒序', value: 'OOrganizationName-desc' },
            { label: '工程名称-正序', value: 'OProjectName-asc' },
            { label: '工程名称-倒序', value: 'OProjectName-desc' },
            { label: '试验类型-正序', value: 'OPouringPosition-asc' },
            { label: '试验类型-倒序', value: 'OPouringPosition-desc' },
            { label: '出料时间-正序', value: 'ODischargingTime-asc' },
            { label: '出料时间-倒序', value: 'ODischargingTime-desc' },
            { label: '强度等级-正序', value: 'OStrengthGrade-asc' },
            { label: '强度等级-倒序', value: 'OStrengthGrade-desc' },
            { label: '问题类别-正序', value: 'OMixPlatHandleTypeName-asc' },
            { label: '问题类别-倒序', value: 'OMixPlatHandleTypeName-desc' },
        ],
        LabAsphaltMixingStationExceeded: [
            { label: '组织机构-正序', value: 'OOrganizationName-asc' },
            { label: '组织机构-倒序', value: 'OOrganizationName-desc' },
            { label: '工程名称-正序', value: 'OEngineeringName-asc' },
            { label: '工程名称-倒序', value: 'OEngineeringName-desc' },
            { label: '施工地点-正序', value: 'OConstructionSite-asc' },
            { label: '施工地点-倒序', value: 'OConstructionSite-desc' },
            { label: '使用层位-正序', value: 'OLayerPosition-asc' },
            { label: '使用层位-倒序', value: 'OLayerPosition-desc' },
            { label: '出料时间-正序', value: 'ODischargingTime-asc' },
            { label: '出料时间-倒序', value: 'ODischargingTime-desc' },
            { label: '配合比编号-正序', value: 'OProportionIdGet-asc' },
            { label: '配合比编号-倒序', value: 'OProportionIdGet-desc' },
            { label: '问题类别-正序', value: 'OMixPlatHandleTypeName-asc' },
            { label: '问题类别-倒序', value: 'OMixPlatHandleTypeName-desc' },
        ],
        BeamSeatBeamModel: [
            { label: '台座名称-正序', value: 'OBeamSeatName-asc' },
            { label: '台座名称-倒序', value: 'OBeamSeatName-desc' },
            { label: 'Bim模型构件编号-正序', value: 'OBeamSeatBeamModelName-asc' },
            { label: 'Bim模型构件编号-倒序', value: 'OBeamSeatBeamModelName-desc' },
        ],
        BeamProduceRecord: [
            { label: '组织机构-正序', value: 'OOrganizationUuid-asc' },
            { label: '组织机构-倒序', value: 'OOrganizationName-desc' },
            { label: '桥名称-正序', value: 'OBridgeName-asc' },
            { label: '桥名称-倒序', value: 'OBridgeName-desc' },
            { label: '部位-正序', value: 'OPart-asc' },
            { label: '部位-倒序', value: 'OPart-desc' },
            { label: '梁类型-正序', value: 'OBeamTypeName-asc' },
            { label: '梁类型-倒序', value: 'OBeamTypeName-desc' },
            { label: '最新的施工工序-正序', value: 'OProcessName-asc' },
            { label: '最新的施工工序-倒序', value: 'OProcessName-desc' },
            { label: '最新的台座-正序', value: 'OBeamSeatName-asc' },
            { label: '最新的台座-倒序', value: 'OBeamSeatName-desc' },
            { label: '审核状态-正序', value: 'OAuditStatus-asc' },
            { label: '审核状态-倒序', value: 'OAuditStatus-desc' },
            { label: '生产日期-正序', value: 'OProduce-asc' },
            { label: '生产日期-倒序', value: 'OProduce-desc' },
        ],
        InfoManage: [
            { label: '组织机构-正序', value: 'OOrganizationSortId-asc' },
            { label: '组织机构-倒序', value: 'OOrganizationSortId-desc' },
            { label: '主题名称-正序', value: 'OTableName-asc' },
            { label: '主题名称-倒序', value: 'OTableName-desc' },
            { label: '事件日期-正序', value: 'OEventDate-asc' },
            { label: '事件日期-倒序', value: 'OEventDate-desc' },
        ],
        FlowForm: [
            { label: '申请日期-正序', value: 'OEventDate-asc' },
            { label: '申请日期-倒序', value: 'OEventDate-desc' },
            { label: '标题-正序', value: 'OTableName-asc' },
            { label: '标题-倒序', value: 'OTableName-desc' },
            { label: '副标题-正序', value: 'OFullName-asc' },
            { label: '副标题-倒序', value: 'OFullName-desc' },
            { label: '最新状态-正序', value: 'OApprovalStatus-asc' },
            { label: '最新状态-倒序', value: 'OApprovalStatus-desc' },
        ],
        CostMonth: [
            { label: '组织机构-正序', value: 'OOrganizationSortId-asc' },
            { label: '组织机构-倒序', value: 'OOrganizationSortId-desc' },
            { label: '申报年月-正序', value: 'OEventDate-asc' },
            { label: '申报年月-倒序', value: 'OEventDate-desc' },
        ],
    }
    return (
        <Select
            popupMatchSelectWidth={true}
            placeholder="请选择"
            mode="multiple"
            options={SearchList[options]}
            value={value}
            onChange={onChange}
            filterOption={(input, option) => (option?.label ?? '').includes(input)}
            filterSort={(optionA, optionB) =>
                (optionA?.label ?? '').toLowerCase().localeCompare((optionB?.label ?? '').toLowerCase())
            }
        />
    )
}

export const SelectModal = ({ value, onChange, options }) => {
    SelectModal.propTypes = {
        value: PropTypes.string,
        onChange: PropTypes.func,
        options: PropTypes.object
    }
    return (
        <Select
            options={Object.keys(options).map(item => ({ label: options[item], value: item }))}
            allowClear
            showSearch
            value={value}
            onChange={onChange}
            filterOption={(input, option) => (option?.label ?? '').includes(input)}
            filterSort={(optionA, optionB) => (optionA?.label ?? '').toLowerCase().localeCompare((optionB?.label ?? '').toLowerCase())}
        />
    )
}



export const SelectDateModal = ({ originProps, onChange }) => {
    SelectDateModal.propTypes = {
        originProps: PropTypes.object,
        onChange: PropTypes.func,
    }
    const { picker, showTime } = originProps
    const onDate = e => {
        if (showTime) onChange(e.format(DateList['showTime']))
        else onChange(e.format(DateList[picker]))
    }
    return <DatePicker picker={picker} showTime={showTime} style={{ width: '100%' }} onChange={onDate} />
}

export const RenderDate = ({ date, picker, showTime }) => {
    RenderDate.propTypes = {
        date: PropTypes.string,
        picker: PropTypes.string,
        showTime: PropTypes.bool,
    }
    return <div>{showTime ? dayjs(date).format(DateList.showTime) : dayjs(date).format(DateList[picker])}</div>
}


export const TreeSearchModal = ({ options, onChange }) => {
    TreeSearchModal.propTypes = {
        options: PropTypes.object,
        onChange: PropTypes.func,
    }
    const { fieldNames, options: treeData } = options
    return (
        <TreeSelect
            showSearch
            style={{ width: '100%' }}
            fieldNames={fieldNames}
            placeholder="请选择"
            treeDefaultExpandAll
            onChange={onChange}
            treeData={treeData}
            treeNodeFilterProp={fieldNames.label}
        />
    )
}